home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PD ROM 1
/
PD ROM Volume I - Macintosh Software from BMUG (1988).iso
/
Programming
/
Languages
/
MiniAda
/
MiniAda.txt
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1986-03-10
|
376 b
|
19 lines
|
[
TEXT/ttxt
]
declare
m,n : integer;
b : boolean;
begin
<<again>> m := 10000;
for i in reverse 1 .. (m*3) loop
b := true; n := i;
while b loop
if n=(2*(n/2)) then
n := (n/2); exit when n<i;
else
n := ((3*n)+1);
end if;
b := n>1 ;
end loop;
end loop;
goto again;
end;